<?php

/**
 * content actions.
 *
 * @package    khas
 * @subpackage content
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 3335 2007-01-23 16:19:56Z fabien $
 */
class contentActions extends sfActions
{
    public function preExecute()
    {
    }
    
    public function executeBranch1(sfWebRequest $request)
    {
        //$this->rss = Doctrine::getTable('Content')->doFetchArray(array('categoryId'=>$request->getParameter('categoryId')), $request->getParameter('page'));
        
        //$listtype = $request->getParameter('listtype', 'list1');
        //$this->setTemplate($listtype);
    }
    
    public function executeBranch2(sfWebRequest $request)
    {
        //$this->rss = Doctrine::getTable('Content')->doFetchArray(array('categoryId'=>$request->getParameter('categoryId')), $request->getParameter('page'));
        
        //$listtype = $request->getParameter('listtype', 'list1');
        //$this->setTemplate($listtype);
    }
    
    public function executeBranch3(sfWebRequest $request)
    {
        $this->category = $category = Doctrine::getTable('Category')->find($request->getParameter('categoryId'));
        
        $this->content = $content = Doctrine::getTable('Content')->doFetchOne(array('isFeatured'=>'1', 'categoryId'=>$category->getId()));

        //$listtype = $request->getParameter('listtype', 'list1');
        //$this->setTemplate($listtype);
    }
    
    public function executeLeaf1(sfWebRequest $request)
    {
        $this->content = $content = Doctrine::getTable('Content')->doFetchOne(array('id'=>$request->getParameter('id')));
    }

}